package yxy.apple.http.request;

import yxy.apple.util.http.HTTPProtocol;
import yxy.apple.util.http.HTTPProtocol.Method;

public abstract class OptionsRequest extends HTTPRequest<Object> {
	public OptionsRequest(String url, String origin, Method accessControlRequestMethod) {
		super(Method.Options, url);
		if (origin != null) {
			this.setHeader(HTTPProtocol.HeaderKey.Origin, origin);
		}
		if (accessControlRequestMethod != null) {
			this.setHeader(HTTPProtocol.HeaderKey.AccessControlRequestMethod, accessControlRequestMethod.toString());
		}
	}
}
